/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 * Origin source from MaNGOS(GPL2).
 * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
 */

#ifndef __MAP_H__
#define __MAP_H__

#include "Common.h"
#include "MapRefManager.h"
#include "GridDefine.h"

#include <bitset>
#include <list>

namespace PQCore
{
	class MapRefManager;
	class Map
	{
	public:
		friend MapReference;
		virtual void Update(const uint32 deltaT);
		void resetMarkedCells() { _markedCells.reset(); }

		float GetVisibilityDistance() const { return _visibleDistance; }
	private:
		MapRefManager _mapRefManager;
        MapRefManager::iterator _mapRefIter;
		std::bitset<TOTAL_NUMBER_OF_CELLS_PER_MAP*TOTAL_NUMBER_OF_CELLS_PER_MAP> _markedCells;
		float _visibleDistance;

	};
}

#endif
